<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>宇将军飞踢</title>
    <style>
        div{
    width: 1000px;
    height: 500px;
    background: rgb(48, 216, 216);
    }
#yjj {
  width: 100px;
  height: 100px;
  background-color: red;
  position: relative;
  animation-name: example;
  animation-duration: 4s;
  animation-iteration-count: infinite;
}


@keyframes example{
            from {
                left: 0px;
                top: 0px;
                background-color: aqua;
            }
            25%{
                left: 900px;
                top: 200px;
                background-color: azure;
            }
            50% {
                left: 0px;
                top: 400px;
                background-color: black;
            }
            75%{
                left: 900px;
                top: 200px;
                background-color: brown;
            }
            to{
                left: 0px;
                top: 0px;
                background-color: palegreen;
            }
        }  
    </style>

</head>
<body>
   <div><div id="yjj">

   </div>

   </div>
</body>
</html>